From: Jyrki Gadinger Date: Mon, 10 Feb 2025 15:03:56 +0000 (+0100) Subject: skip attempt to install updates at launch when update checks are disabled X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~2^2~72^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=9c9f1e9e2096a7cb81ae091d37ec07d56938395e;p=nextcloud-desktop.git skip attempt to install updates at launch when update checks are disabled Signed-off-by: Jyrki Gadinger --- diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp index b5f6ad49d..5ea608130 100644 --- a/src/gui/updater/ocupdater.cpp +++ b/src/gui/updater/ocupdater.cpp @@ -496,6 +496,13 @@ bool NSISUpdater::handleStartup() { ConfigFile cfg; QSettings settings(cfg.configFile(), QSettings::IniFormat); + + // no need to try to install a previously fetched update when the user doesn't want automated updates + if (cfg.skipUpdateCheck() || !cfg.autoUpdateCheck()) { + qCInfo(lcUpdater) << "Skipping installation of update due to config settings"; + return false; + } + QString updateFileName = settings.value(updateAvailableC).toString(); // has the previous run downloaded an update? if (!updateFileName.isEmpty() && QFile(updateFileName).exists()) {